//
//  UIView+AnnFrame.m
//  MVVMPractice
//
//  Created by iSolar on 2017/11/30.
//  Copyright © 2017年 com.ann.lmj. All rights reserved.
//

#import "UIView+AnnFrame.h"

@implementation UIView (AnnFrame)

- (void)setExt_x:(CGFloat)ext_x
{
    CGRect frame = self.frame;
    frame.origin.x = ext_x;
    self.frame = frame;
}

- (CGFloat)ext_x
{
    return self.frame.origin.x;
}

- (void)setExt_y:(CGFloat)ext_y
{
    CGRect frame = self.frame;
    frame.origin.y = ext_y;
    self.frame = frame;
}

- (CGFloat)ext_y
{
    return self.frame.origin.y;
}

- (void)setExt_centerX:(CGFloat)ext_centerX
{
    CGPoint center = self.center;
    center.x = ext_centerX;
    self.center = center;
}

- (CGFloat)ext_centerX
{
    return self.center.x;
}

- (void)setExt_centerY:(CGFloat)ext_centerY
{
    CGPoint center = self.center;
    center.y = ext_centerY;
    self.center = center;
}

- (CGFloat)ext_centerY
{
    return self.center.y;
}

- (void)setExt_width:(CGFloat)ext_width
{
    CGRect frame = self.frame;
    frame.size.width = ext_width;
    self.frame = frame;
}

- (CGFloat)ext_width
{
    return self.frame.size.width;
}

- (void)setExt_height:(CGFloat)ext_height
{
    CGRect frame = self.frame;
    frame.size.height = ext_height;
    self.frame = frame;
}

- (CGFloat)ext_height
{
    return self.frame.size.height;
}

- (void)setExt_size:(CGSize)ext_size
{
    CGRect frame = self.frame;
    frame.size = ext_size;
    self.frame = frame;
}

- (CGSize)ext_size
{
    return self.frame.size;
}

@end
